package cn.stylefeng.guns.modular.system.model;

import com.baomidou.mybatisplus.enums.IdType;
import java.math.BigDecimal;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import java.io.Serializable;

/**
 * <p>
 * 金币变化记录
 * </p>
 *
 * @author liyong
 * @since 2019-12-04
 */
@TableName("change_log")
public class ChangeLog extends Model<ChangeLog> {

    private static final long serialVersionUID = 1L;

    /**
     * 金币变化记录
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 玩家id
     */
    @TableField("user_id")
    private Integer userId;
    /**
     * 来源表id
     */
    @TableField("source_id")
    private Integer sourceId;
    /**
     * 来源表
     */
    @TableField("scurce_table")
    private String scurceTable;
    /**
     * 类型 0-积分 1-金币
     */
    private Integer type;
    /**
     * 变化原因 0-游戏获得
     */
    @TableField("change_type")
    private Integer changeType;
    /**
     * 变化前
     */
    @TableField("before_num")
    private BigDecimal beforeNum;
    /**
     * 变化后
     */
    @TableField("affer_num")
    private BigDecimal afferNum;
    /**
     * 变化数值
     */
    @TableField("change_num")
    private BigDecimal changeNum;
    @TableField("create_time")
    private Date createTime;
    /**
     * 游戏类型
     */
    @TableField("game_type")
    private Integer gameType;


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getSourceId() {
        return sourceId;
    }

    public void setSourceId(Integer sourceId) {
        this.sourceId = sourceId;
    }

    public String getScurceTable() {
        return scurceTable;
    }

    public void setScurceTable(String scurceTable) {
        this.scurceTable = scurceTable;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Integer getChangeType() {
        return changeType;
    }

    public void setChangeType(Integer changeType) {
        this.changeType = changeType;
    }

    public BigDecimal getBeforeNum() {
        return beforeNum;
    }

    public void setBeforeNum(BigDecimal beforeNum) {
        this.beforeNum = beforeNum;
    }

    public BigDecimal getAfferNum() {
        return afferNum;
    }

    public void setAfferNum(BigDecimal afferNum) {
        this.afferNum = afferNum;
    }

    public BigDecimal getChangeNum() {
        return changeNum;
    }

    public void setChangeNum(BigDecimal changeNum) {
        this.changeNum = changeNum;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Integer getGameType() {
        return gameType;
    }

    public void setGameType(Integer gameType) {
        this.gameType = gameType;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "ChangeLog{" +
        ", id=" + id +
        ", userId=" + userId +
        ", sourceId=" + sourceId +
        ", scurceTable=" + scurceTable +
        ", type=" + type +
        ", changeType=" + changeType +
        ", beforeNum=" + beforeNum +
        ", afferNum=" + afferNum +
        ", changeNum=" + changeNum +
        ", createTime=" + createTime +
        ", gameType=" + gameType +
        "}";
    }
}
